<%@ taglib prefix = "spring" uri = "http://www.springframework.org/tags" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<head>
	<link rel="stylesheet" type="text/css" href="<c:url value="/static/css/logbar.css"/>"></link>
	<!-- Seleccionar Menu segun perfil -->
	<sec:authorize access="isAuthenticated() and hasRole('ROLE_ADMIN')">
	<script type="text/javascript" src="<c:url value="/static/js/admin-logbar.js"/>"></script>
	</sec:authorize>
	<sec:authorize access="isAuthenticated() and hasRole('ROLE_USER')">
		<script type="text/javascript" src="<c:url value="/static/js/user-logbar.js"/>"></script>
	</sec:authorize>
	
	
	<sec:authorize access="isAnonymous()">
		<script type="text/javascript" src="<c:url value="/static/js/header.js"/>"></script>	
	</sec:authorize>
	
	<link rel="stylesheet" type="text/css" href="<c:url value="/static/css/menu.css"/>"></link>
	<script type="text/javascript" src="<c:url value="/static/js/components/menu.js"/>"></script>
</head>
<div class="logbar">
	<sec:authorize access="isAnonymous()">
		<div class="buttons-container">
			<ul>
				<li><span id="signup" class="tiny-button-class"><spring:message code="signup"></spring:message></span></li>
				<li><span id="signin" class="tiny-button-class"><spring:message code="signin"></spring:message></span></li>

			</ul>
		</div>
	</sec:authorize>
  	<sec:authorize access="isAuthenticated()">
	  <div class="buttons-container">
		  <ul>
			  <li id="user-menu" >
				  <span class="tiny-button-class"><sec:authentication property="principal.username"></sec:authentication></span>
			  </li>
		  	  <li id="inicio" >
				  <a class="tiny-button-class" href="<c:url value="/index"/>">Inicio</a>
			  </li>
		  </ul>
	  </div>
  </sec:authorize>
  
  <div class="header_menu">
		<ul>
			<li><a href='<c:url value="/index"/>'><spring:message code="label.index"></spring:message></a></li>
			<li><a href="<c:url value="/search"/>"><spring:message code="label.search"></spring:message></a></li>
			<li><a href="<c:url value="/create-event"/>"><spring:message code="label.crear.evento"></spring:message></a></li>
			<li><a href="<c:url value="/in-progress"/>"><spring:message code="label.how.it.works"></spring:message></a></li>
			<sec:authorize access="isAuthenticated() and hasRole('ROLE_USER')">
				<li><a href="<c:url value="/inbox"/>"><spring:message code="label.profile"></spring:message></a></li>
			</sec:authorize>
		</ul>
	</div>
</div>

<c:url value="/j_spring_security_logout" var="action"/>
<form action="${action}" method="get" id="logout-form">
	<input type="hidden" name="logout-success-url" value="/index" />
</form>